/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : usart.h
  * @brief          : Header for usart.c file.
  *                   This file contains the common defines of the application.
  * @author         : Qilong Huang <jcdiyhelp@qq.com>
  * @date           : 2021-06-08 
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2021 Joy create tech(Suzhou, China) Co., Ltd.
  * All rights reserved.
  *
  *
  ******************************************************************************
  */
 /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USART_H
#define __USART_H

#ifdef __cplusplus
extern "C" {
#endif

/* Global include ---------------------------------------------------------*/
#include "stm32l1xx.h"
#include "stm32l1xx_hal.h"
#include "global.h"
#include "type.h"

/*Public function declaration*/
void USART_uartInit(void);
void USART_SendString(SINT8_t *str);
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart);
void USART_ClearQueue(void);

/*Public variable declaration*/
extern UART_HandleTypeDef huart1;
extern TYP_UsartBuffer_t UsartBuffer;

#ifdef __cplusplus
}
#endif

#endif /* __USART_H */